package cn.iocoder.yudao.module.call.dal.mysql.ivrgroup;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrgroup.IvrGroupDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.Ivrgroup.vo.*;

/**
 * ivr组 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrGroupMapper extends BaseMapperX<IvrGroupDO> {

    default PageResult<IvrGroupDO> selectPage(IvrGroupPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrGroupDO>()
                .likeIfPresent(IvrGroupDO::getTitle, reqVO.getTitle())
                .eqIfPresent(IvrGroupDO::getParentId, reqVO.getParentId())
                .betweenIfPresent(IvrGroupDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(IvrGroupDO::getId));
    }

}